<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="/">班级说说</a>
            <ul class="nav navbar-nav">
                <li <%if(active=="index"){%>class="active"<% }%>><a href="/">全部说说</a></li>
                <li><a href="/user">我的说说</a></li>
                <li><a href="/alluser">成员列表</a></li>

            </ul>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
            <% if(!login) { %>
            <ul class="nav navbar-nav navbar-right">
                <li <%if(active=="login"){%>class="active"<% }%>><a href="/login">登录</a></li>
                <li <%if(active=="register"){%>class="active"<% }%>><a href="/register">注册</a></li>
            </ul>
            <%  } else { %>
            <ul class="nav navbar-nav navbar-right">
                <li class="active"><a href="#">欢迎您,<%= username %></a></li>
                <li class="active"><a href="#">设置</a></li>
            </ul>
            <% } %>
        </div><!--/.navbar-collapse -->
    </div>
</nav>